package com.geeklei.media.ui.utils;

import com.geeklei.media.ui.common.MediaConstants;

public class TimeUtils {


    public static String parseTime(int i) {
        StringBuilder stringBuilder = new StringBuilder();
        int i2 = (i / MediaConstants.DEFAULT_IMG_SHOW_DURATION) / 3600;
        if (i2 < 10) {
            stringBuilder.append(MediaConstants.DOWNLOAD_MODE_SELF);
        }
        stringBuilder.append(i2);
        stringBuilder.append(":");
        i2 = ((i / MediaConstants.DEFAULT_IMG_SHOW_DURATION) % 3600) / 60;
        if (i2 < 10) {
            stringBuilder.append(MediaConstants.DOWNLOAD_MODE_SELF);
        }
        stringBuilder.append(i2);
        stringBuilder.append(":");
        i2 = ((i / MediaConstants.DEFAULT_IMG_SHOW_DURATION) % 3600) % 60;
        if (i2 < 10) {
            stringBuilder.append(MediaConstants.DOWNLOAD_MODE_SELF);
        }
        stringBuilder.append(i2);
        return stringBuilder.toString();
    }

    public static String parseShortTime(int i) {
        if (i == 0) {
            return "";
        }
        StringBuilder stringBuilder = new StringBuilder();
        int i2 = (i / MediaConstants.DEFAULT_IMG_SHOW_DURATION) / 3600;
        if (i2 > 0) {
            if (i2 < 10) {
                stringBuilder.append(MediaConstants.DOWNLOAD_MODE_SELF);
            }
            stringBuilder.append(i2);
            stringBuilder.append(":");
        }
        i2 = ((i / MediaConstants.DEFAULT_IMG_SHOW_DURATION) % 3600) / 60;
        if (i2 < 10) {
            stringBuilder.append(MediaConstants.DOWNLOAD_MODE_SELF);
        }
        stringBuilder.append(i2);
        stringBuilder.append(":");
        i2 = ((i / MediaConstants.DEFAULT_IMG_SHOW_DURATION) % 3600) % 60;
        if (i2 < 10) {
            stringBuilder.append(MediaConstants.DOWNLOAD_MODE_SELF);
        }
        stringBuilder.append(i2);
        return stringBuilder.toString();
    }
}
